<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/1
 * Time: 16:05
 */

namespace vendor\user;
class user
{
    public static $user_count;
//构造函数
    public function construct()
    {
        self::$userCount++;
        echo '创建用户名对象。';
    }

//注册
    public function register()
    {
        echo '这是注册。';
    }

//登录
    public function login()
    {
        echo '这是登录。';
    }

//修改密码
    public function update_pwd()
    {
        echo '这是修改密码。';
    }

//析构函数
    public function destruct()
    {
        echo '删除用户名对象。';
        self::$userCount--;
    }

    //获取在线人数
    public static function get_online_number(){
        return self::$user_count;
    }
}